<template>
  <GlobalFooter class="i-copyright" :copyright="copyright" />
</template>
<script>
export default {
  name: 'i-copyright',
  data () {
    return {
      copyright: 'Copyright © 2020 梦幻空间博客 All Rights Reserved 吉ICP备18002003号'
    }
  },
  mounted () {
    this.getVersion();
  },
  methods: {
    getVersion () {
      this.$store.dispatch('admin/db/get', {
        dbName: 'sys',
        path: 'user.info',
        user: true
      }).then(res => {
        this.copyright += res.version ? '  |  ' + res.version : '';
      })
    }
  }
}
</script>
<style lang="less">
.i-copyright {
  flex: 0 0 auto;
}
</style>
